package com.fenghongzhang.a1806;

import androidx.appcompat.app.AppCompatActivity;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

    }

    public void click(View view) {

        DiyDialog diyDialog = new DiyDialog(this);
        diyDialog.setMessage("赫尔");
        diyDialog.setTitle("呵呵");
        diyDialog.setYesOnclickListener("呵呵", new DiyDialog.onYesOnclickListener() {
            @Override
            public void onYesOnclick() {
                Toast.makeText(MainActivity.this, "呵呵", Toast.LENGTH_SHORT).show();
            }
        });
        diyDialog.show();
//
    }
}
